1. Field of the Disclosure
The present disclosure generally relates to a method and an apparatus for reconnecting communication between electronic devices in short-range wireless communication.
2. Description of the Related Art
Various electronic devices, e.g. mobile apparatuses, include a wireless communication function. A protocol or a process for wireless communication between the electronic devices has also been established in accordance with the wireless communication function.
For example, Bluetooth, Wi-Fi Direct, Peer to Peer (P2P), etc., have been known as direct short-range communication protocols between the electronic devices. The electronic devices may exchange data or control information with each other by using such short-range communication protocols.
Here, the Bluetooth may be implemented by a Bluetooth Low Energy (BLE) in order to increase a communication lifespan of sensor devices operated by electric power of a battery.
Using BLE, devices operated by battery (e.g. coin cell battery) can operate for several months or several years with low electric power.
FIG. 1 illustrates electronic devices which perform general short-range communication. Referring to FIG. 1, a smart phone 10 and BLE devices 21 and 22 may perform BLE communication. The BLE devices 21 and 22 include, for example, a smart watch 21 which has a form and a function which are similar to those of a general watch and can perform in conjunction with other electronic devices, and smart glasses 22 which have a form of glasses and can display information transmitted from other electronic devices.
In general, the BLE communication is performed between a master device and a slave device. The slave device broadcasts advertisement data through an advertising channel in order to advertise its existence. The master device scans the advertising channel by opening a scan window at each predetermined time cycle. When the master device scans the broadcasted advertisement data from the slave device at a specific cycle, a link between the two devices may be generated. Further, a link between the two devices may not be generated according to the advertisement data of the slave device. In the Bluetooth standard, whether a connection is made or not in BLE may be determined according to a Protocol Data Unit (PDU) included in an advertising event type. Table 1 relates to types of the PDU according to the advertising event type (PDU used in this advertising event type), and an allowable response according to the corresponding types of the PDU (Allowable response PDUs for advertising event). Referring to Table 1, for example, in order not to generate the link, the slave device sets the advertising event type as “non-connectable Undirected Event”, so that the slave device may broadcast advertisement data including a PDU of “ADC_NONCONN_IND”. Since the advertisement data including the PDU of “ADV_NONCONN_IND” does not allow a response for a connection request CONNECT_REQ, the link generation is impossible.
TABLE 1PDU used in thisAllowable response PDUsAdvertisingadvertisingfor advertising eventEvent Typeevent typeSCAN_REQCONNECT_REQConnectableADV_INDYESYESUndirectedEventConnectableADV_DIRECT_INDNOYESDirected EventNon-connect- ADV_NONCONN_INDNONOable Undi- rected EventScannable ADV_SCAN_INDYESNOUndirected Event
For example, in FIG. 1, the smartphone 10 may correspond to the master device, and the smart watch 21 and the smart glasses 22 may correspond to the slave device. Meanwhile, link loss may occur in the link set for the BLE communication without a disconnection operation of a user. For example, when the electronic devices become separated from each other by a distance greater than a distance within which the short-range communication can be performed, or when an obstacle is placed between the electronic devices, the link loss may occur. As another reason, when the electronic device cannot receive communication data through the link for a predetermined time period, it is determined that the link loss occurs.
As indicated by reference numeral 110, FIG. 1 is based on an assumption that link loss occurs in link generated between the smartphone 10 and the smart watch 21.
At this time, as indicated by reference numeral 120, an operation of reconnection between the smartphone 10 and the smart watch 21 may be performed. In detail, the smart watch 21 broadcasts the advertisement data, and the smartphone 10 scans the advertisement data in a scan window. Thereafter, when the smartphone 10 scans the advertisement data broadcasted by the smart watch 21, the smartphone 10 and the smart watch 21 may be reconnected.
FIG. 2 illustrates signal timing for connection and reconnection between devices in general short-range communication. Referring to FIG. 2, the slave device 20 cyclically broadcasts advertisement data 221 at a time point t1. Thereafter, when the master device 10 scans the advertisement data 221 through a scan window at a time point of t2, a link (i.e., a connection) for transmitting/receiving communication data between the master device 10 and the slave device 20 may be generated. Thereafter, the master device 10 requests the slave device 20 to perform the connection. When the slave device 20 accepts the connection request of the master device 10, the slave device 20 transmits communication data at a predetermined period, e.g. time points t2 and t3. Meanwhile, when the master device 10 does not continuously receive data transmitted from the slave device 20 at a time point t4, the master device 10 and the slave device 20 determine that link loss is generated. For example, in accordance with the Bluetooth standard, when the master device 10 does not continuously receive data for six times, the master device 10 can identify that the link loss is generated. Alternatively, when the master device 10 does not detect data, although the slave device 20 has transmitted the data, and the slave device 20 does not receive feedback for the transmission data, the master device 10 and the slave device 20 determine that the link loss is generated. The master device 10 cyclically scans an advertising channel again from a time point t5 after the link loss in order to reconnect. Here, the scan window size can be preset to be 11.52 milliseconds and the scanning period may be preset to be 1.28 seconds according to the Bluetooth standard. Meanwhile, the slave device 20, which has detected the link loss, broadcasts the advertisement data 227 again.
Thereafter, when the master device 10 scans the advertisement data of the slave device 20, the master device 10 and the slave device 20 are reconnected with each other at a time point t6 so as to cyclically perform communication.
In order to reduce power consumption of a master device, broadcasting data may be scanned when a scan window size is set to be reduced and a scanning period is set to be lengthened. In this case, the scanning period of the scan window and the broadcasting period of the advertisement data can deviate from each other, so that the probability that the master device scans advertisement data is decreased. For example, when the scan window size is 11.52 milliseconds and the scanning period is 1.28 seconds according to the Bluetooth standard, and when the advertisement data transmitted from a slave device at a period of 500 milliseconds is scanned, about 46 seconds may be averagely consumed until the master device scans the advertisement data of the slave device. As another example, when the advertisement data transmitted at a period of 1.28 seconds is scanned, 1 minute 40 seconds may be consumed until the scanning is completed.
Meanwhile, when the scanning period of the scan window is set to be shortened and the scan window size is set to be enlarged, a probability that the master device scans the advertisement data is increased. However, the power consumption of the master device is increased in proportion to the changed setting.